<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 流年 <liu21st@gmail.com>
// +----------------------------------------------------------------------

// 应用公共文件
//获取管理员账号等级
function get_admin_level($level)
{
     if($level == config('admin.level_super')){
         return '超级管理员';
     }else if ($level == config('admin.level_normal')){
         return '普通管理员';
     }
}
//获取管理员账号状态
function get_admin_status($status)
{
    if ($status == config('admin.status_normal')) {
        $str = "<span class='layui-btn' id='btnok'>正常</span>";
    } elseif ($status == config('admin.status_padding')) {
        $str = "<span class='layui-btn layui-btn-warm' id='btnok'>待审</span>";
    } else {
        $str = "<span class='layui-btn layui-btn-danger' id='btnok'>删除</span>";
    }
    return $str;
}
